package com.gw.jpa.service.impl;

import com.gw.jpa.entity.Emp;
import com.gw.jpa.repository.EmpRepository;
import com.gw.jpa.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    EmpRepository empRepository;
    @Override
    public List<Emp> getEmpJquery() {
        return empRepository.findAll();
    }

    @Override
    public Emp getEmp(Integer empno) {
        return empRepository.findById(empno).get();
    }
}
